% SumSquare
function result = SumSquare(x)
result = 0;
len = length(x);
for i = 1:len
    result = result + i * x(i)^2;
end
end